<div style="margin: 80px 90px 0 80px; border:0px solid #ccc; padding:0 0 0 0 ;">
    <?php echo form_open('todo/insert'); ?>
    <input type="text" style="width:400px"  name="todoText">

    <input type="submit" value="OK" />

    <?php echo form_close(); ?>

</div >
<div style="-moz-border-radius:4px; -webkit-border-radius:4px; border-radius:4px; margin: 10px 80px 0 80px; border:1px solid #ccc; padding:0 0 0 0;">
    <table border="0" cellpadding="3" cellspacing="0" width="100%">
        <tr>
            <th style="text-align: left">Date Insertion</th>
            <th style="text-align: left">Todo</th>
            <th style="text-align: left">Etat</th>
        </tr>   

        <?php
        foreach ($todos as $todo) {
            $dt_done = $todo->dt_done;
            if ($dt_done == "") {
                $dt_done = "<a href=\"" . site_url("todo/Done/" . $todo->id) . "\">Done</a>";
            } else {
                $dt_done = "Fait le " . $dt_done;
            }
            echo "<tr style='line-height:200%'>";
            echo "<td style='width:120px; border-top: 1px solid #ccc;'>" . $todo->dt_insertion . "</td>";
            echo "<td style='width:250px; border-top: 1px solid #ccc'>" . $todo->todo_text . "</td>";
            echo "<td style='width:150px; border-top: 1px solid #ccc'>" . $dt_done . "</td>";
            echo "</tr>";
        }
        ?>
    </table>
</div>
